package models

import (
	"time"
)

type Slave struct {
	SlaveId      uint      `xorm:"slave_id notnull int pk autoincr"`
	MasterId     uint      `xorm:"master_id notnull int" valid:"required,uint32"`
	Host         uint      `xorm:"host notnull int unique" valid:"required,uint32"`
	Port         uint16    `xorm:"port notnull smallint" valid:"required,port"`
	User         []byte    `xorm:"user notnull varbinary(48)" valid:"required"`
	Password     []byte    `xorm:"password notnull varbinary(48)" valid:"required"`
	Status       uint8     `xorm:"status notnull tinyint" valid:"required,matches(^(0|1)$)"`
	CreationDate time.Time `xorm:"creation_date notnull datetime"`
}
